import React ,{useState,useMemo} from 'react'

type Props = {}

const App_hooks = (props: Props) => {
    const [count,setCount] = useState(1)
    const [val,setVal] = useState("")
    const get_count = useMemo(()=>{
        console.log(11);
        return count
    },[count])
  return (
    <div>App_hooks
        <br />
        <p>
            val:{val}
        </p>
        <p>count:{count}</p>
        <p>get_count:{get_count}</p>
        <button onClick={()=>{
            console.log("++++");
            setCount(count+1)
        }}>+1 </button>
        <input type="text" value={val} onChange={(e)=> setVal(e.target.value)} />


    </div>
  )
}

export default App_hooks